const db = require("../../models/index")
const Message = db.messages

// 查询所有数据
exports.findAll = (req, res) => {
    Message.findAll().then((data) => {
        res.send({
            data: data,
            code: 101,
            msg: "查询成功"
        })
    }).catch(err => {
        console.log(err.message + "查询数据出错")
    })
}